Practical considerations for lock-free concurrent objects
نویسنده
چکیده
A n important class of concurrent objec t s are those that are lock-free, tha t is, whose operat ions are not conta ined wi th in mutua l ly exclusive critical sect ions . A lock-free object can be accessed by m a n y threads at a t ime , yet clever u p d a t e protocols based on a t o m i c C o m p a r e A n d S w a p operat ions guarantee the object ' s consistency. In th is paper we take a practical look at the C o m p a r e A n d S w a p operat ion in the context of contemporary shared m e m o r y mult iprocessors . We first describe an operating s y s t e m b a s e d so lut ion tha t permit s the construct ion of a non-blocking C o m p a r e A n d S w a p funct ion on processor architectures that only support lock-oriented a t o m i c primit ives . We then eva luate several locking strategies that can be used to synthes ize a C o m p a r e A n d S w a p operat ion . W e show that the c o m m o n techniques for reducing the overhead of lock-oriented synchronizat ion in the presence of content ion are inappropria te when used as the basis for lock-free synchronizat ion. We then describe a s imple modif icat ion t o an ex i s t ing synchronizat ion protocol which allows us to avoid much of the overhead normal ly assoc iated wi th content ion. This research was sponsored in part by a National Science Foundation Presidential Young Investigator Award (PYI), the Defense Advanced Research Projects Agency, Information Science and Technology Office, under the title "Research on Parallel Computing", ARPA Order No. 7330, issued by DARPA/CMO under Contract MDS972-90-C-0035 and in part by the Open Software Foundation (OSF). The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of NSF, DARPA, OSF, or the U.S. government.
منابع مشابه
Progress Guarantees When Composing Lock-Free Objects
Highly concurrent and reliable data objects are vital for parallel programming. Lock-free shared data objects are highly concurrent and guarantee that at least one operation, from a set of concurrently executed operations, finishes after a finite number of steps regardless of the state of the other operations. Lock-free data objects provide progress guarantees on the object level. In this paper...
متن کاملCharacterizing the Performance of Algorithms for Lock-Free Objects
Concurrent access to shared data objects must be regulated by a concurrency control protocol to ensure correctness. Many concurrency control protocols require that a process set a lock on the data it accesses. Recently, there has been considerable interest in lock-free concurrency control algorithms. Lock-free algorithms ooer the potential for better system performance because slow or failed pr...
متن کاملChapter 6 Scalable and Lock - Free Concurrent Dictionaries 1
We present an efficient and practical lock-free implementation of a concurrent dictionary that is suitable for both fully concurrent (large multiprocessor) systems as well as pre-emptive (multi-process) systems. Many algorithms for concurrent dictionaries are based on mutual exclusion. However, mutual exclusion causes blocking which has several drawbacks and degrades the system’s overall perfor...
متن کاملOn lock-free programming patterns
Lock-free programming is a well-known technique for multithreaded programming. Lock-free programming is a way to share changing data among several threads without paying the cost of acquiring and releasing locks. On practice, parallel programming models must include scalable concurrent algorithms and patterns. Lock-free programming patterns play an important role in scalability. This paper is d...
متن کاملFast and Lock-Free Concurrent Priority Queues for Multi-Thread Systems
We present an efficient and practical lock-free implementation of a concurrent priority queue that is suitable for both fully concurrent (large multi-processor) systems as well as pre-emptive (multi-process) systems. Many algorithms for concurrent priority queues are based on mutual exclusion. However, mutual exclusion causes blocking which has several drawbacks and degrades the overall perform...
متن کامل